package com.ehotting.edsta.csharpServer.service.impl;

import java.util.List;

import com.ehotting.eaf.security.service.TokenService;
import com.ehotting.edsta.csharpServer.domain.vo.AppVersionVo;
import com.ehotting.edsta.csharpServer.mapper.UserRsaMapper;
import com.ehotting.eaf.core.domain.system.api.AppVersion;
import com.ehotting.edsta.csharpServer.mapper.AppVersionMapper;
import com.ehotting.edsta.csharpServer.service.IAppVersionService;
import com.ehotting.eaf.core.domain.system.api.UserRsa;
import com.ehotting.eaf.core.domain.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * C端软件版本管理Service业务层处理
 * 
 * @author edsta
 * @date 2023-04-07
 */
@Service
public class AppVersionServiceImpl implements IAppVersionService {

    @Resource
    private AppVersionMapper appVersionMapper;

    /**
     * 查询C端软件版本管理
     *
     * @param appVersion C端软件版本号，C端软件版本名称
     * @return C端软件版本管理
     */
    @Override
    public AppVersionVo init(AppVersion appVersion) {
        AppVersion result = appVersionMapper.selectAppVersionByCodeAndName(appVersion);

        AppVersionVo appVersionVo = new AppVersionVo();
        appVersionVo.setAppVersionCode(result.getAppVersionCode());
        appVersionVo.setAppVersionName(result.getAppVersionName());
        appVersionVo.setAppVersionState(result.getAppVersionState());
        appVersionVo.setLicenseState("");

        return appVersionVo;
    }

}
